﻿using System;
using T4ViewModel;

namespace T4ViewModel.Test.ViewModels
{
    public class PersonPostViewModel : ViewModel<T4ViewModel.Test.BlogPostModel>
    {
        public PersonPostViewModel() {}
        public PersonPostViewModel(T4ViewModel.Test.BlogPostModel model) : base(model) {}
        
        public System.Int32 Id { get; set; }
        [System.ComponentModel.DataAnnotations.RequiredAttribute()]
        [System.ComponentModel.DataAnnotations.MaxLengthAttribute(250)]
        public System.String Title { get; set; }
        [System.ComponentModel.DataAnnotations.RequiredAttribute()]
        public System.String Body { get; set; }
        [System.ComponentModel.DataAnnotations.RequiredAttribute()]
        public T4ViewModel.Test.PersonModel Author { get; set; }
        public System.String PersonName { get; set; }
        
        
    }
    
    public class PersonNameViewModel : ViewModel<T4ViewModel.Test.PersonModel>
    {
        public PersonNameViewModel() {}
        public PersonNameViewModel(T4ViewModel.Test.PersonModel model) : base(model) {}
        
        [System.ComponentModel.DataAnnotations.RequiredAttribute(ErrorMessageResourceName = "TestErrorMessage", ErrorMessageResourceType = typeof(T4ViewModel.Test.Resource))]
        public System.String FirstName { get; set; }
        [System.ComponentModel.DataAnnotations.RequiredAttribute()]
        public System.String LastName { get; set; }
        
        
    }
    
    public class CommentViewModel : ViewModel<T4ViewModel.Test.CommentModel>
    {
        public CommentViewModel() {}
        public CommentViewModel(T4ViewModel.Test.CommentModel model) : base(model) {}
        
        public System.Int32 Id { get; set; }
        [System.ComponentModel.DataAnnotations.RequiredAttribute()]
        public System.String Contents { get; set; }
        [System.ComponentModel.DataAnnotations.RequiredAttribute()]
        public T4ViewModel.Test.PersonModel Author { get; set; }
        [System.ComponentModel.DataAnnotations.RequiredAttribute()]
        [System.ComponentModel.DataAnnotations.RangeAttribute(0, 2147483647)]
        public System.Int32 Likes { get; set; }
        [System.ComponentModel.DataAnnotations.RangeAttribute(0, 5, ErrorMessage = "Rating cannot be greater than 5")]
        public System.Boolean Rating { get; set; }
        
        
    }
    
}
